import { createRouter, createWebHashHistory } from 'vue-router'


const routes = [
    { path: '/', redirect: '/subject_hall' },
    { path: '/homepage', name: 'homepage', component: () => import('../../views/student/HomepageView.vue')},
    {
        path: '/subject_hall', name: 'hall', component: () => import('../../views/student/SubjectHallView.vue')
        // children: [
        //     {
        //         path: '',
        //         name: 'subject_hall_home',
        //         component: () => import('../../views/student/SubjectHallHomeView.vue')
        //     },
        //     {
        //         path: 'subject_detail/:subject_id',
        //         name: 'subject_detail',
        //         component: () => import('../../views/student/SubjectDetailView.vue')
                
        //     }
        // ]
    },
    { path: '/subject_hall/subject_detail/:subject_id', name: 'subject_detail', component: () => import('../../views/student/SubjectDetailView.vue') },
    { path: '/team_hall', name: 'team_hall', component: () => import('../../views/student/TeamHallView.vue') },
    { path: '/create_team', name: 'create_team', component: () => import('../../views/student/CreateTeamView.vue') },
    { path: '/team_detail/:team_id', name: 'team_detail', component: () => import('../../views/student/TeamDetailView.vue') },
    { path: '/my_subjects', name: 'subjects', component: () => import('../../views/student/MySubjectsView.vue'), 
    // children: [
    //     {
    //         path: '',
    //         name: 'subjects_home',
    //         component: () => import('../../views/student/MySubjectsHomeView.vue')
    //     },
    //     {
    //         path: 'subjects_joined_detail/:subject_id',
    //         name: 'subjects_joined_detail',
    //         component: () => import('../../views/student/SubjectJoinedDetailView.vue')
    //     }
    // ] 
},
    { path: '/my_subjects/subjects_joined_detail/:subject_id', name: 'subjects_joined_detail', component: () => import('../../views/student/SubjectJoinedDetailView.vue') },
    { path: '/my_subjects/subjects_joined_detail/:subject_id/my_practice', name: 'my_practice', component: () => import('../../views/student/MyPracticeView.vue') },
    { path: '/my_subjects/teamwork/:subject_id', name: 'teamwork', component: () => import('../../views/student/TeamworkView.vue') },
    { path: '/my_subjects/teamwork/:subject_id/instructor_comments', name: 'instructor_comments', component: () => import('../../views/student/InstructorCommentsView.vue') },
    { path: '/apply_subject', name: 'application', component: () => import('../../views/student/ApplySubjectView.vue') },
    { path: '/profiles', name: 'profiles', component: () => import('../../views/student/ProfilesView.vue') }
   
]

export default createRouter({
    history: createWebHashHistory(),
    routes,
    strict: true
})